public class Leetcode2357 {

    public int minimumOperations(int[] nums) {
        boolean[] flag = new boolean[101];
        for (int num : nums) {
            flag[num] = true;
        }

        int res = 0;
        flag[0] = false;
        for (boolean b : flag) {
            if (b) {
                res++;
            }
        }

        return res;
    }
}
